package com.lcm.oj.lanqiao.year2021.moni.c1;

/**
 * @author Coder-lcm
 * @date 2021/4/17
 */
public class T5 {
    public static void main(String[] args) {
        int[] nums = {87, 39, 35, 1, 99, 10, 54, 1, 46, 24, 74, 62, 49, 13, 2, 80, 24, 58, 8, 14, 83, 23, 97, 85, 3, 2, 86, 10, 71, 15};
        int len = nums.length;
        int res = 0;
        for (int i = 0; i < len; i++) {
            for (int i1 = i+1; i1 < len; i1++) {
                if (nums[i1] < nums[i]) {
                    res++;
                }
            }
        }
        System.out.println(res);
    }
}
